/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.gis.domain;

import io.swagger.models.auth.In;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.sql.Timestamp;
import java.io.Serializable;
import java.util.Optional;
import java.util.function.Supplier;

/**
* @website https://el-admin.vip
* @description /
* @author ZhuangBing Yan
* @date 2022-08-19
**/
@Entity
@Data
@Table(name="time_line")
public class TimeLine implements Serializable {

    @Id
    @Column(name = "`id`")
    @ApiModelProperty(value = "主表主键ＩＤ")
    private Long id;

//    @ApiModelProperty(value = "主表主键ＩＤ")
//    @OneToOne(fetch = FetchType.LAZY)
//    @JoinColumn(name="id",referencedColumnName="id")
//    private FeedHistory feedHistory;

    @Column(name = "`enter_in_time`")
    @ApiModelProperty(value = "进厂时间")
    private Timestamp enterInTime;

    @Column(name = "`line_position`")
    @ApiModelProperty(value = "路经线坐标")

    private String linePosition;

    public void copy(TimeLine source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
